<template>
	<view>
		<view class="Center">
			<view class="Title">输入意见反馈内容：</view>
			<textarea maxlength="100" v-model="feedback" class="textarea" />
		</view>
		<view class="Submit"  @click="Submit()">提交反馈</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				feedback:""
			}
		},
		methods: {
			Submit(){
				let that=this;
				if(that.feedback.length<=0){
					return uni.showToast({
						icon:'none',
						title:"请填写反馈意见"
					})
				}
				this.$util.request({
					url: '/mobile/index.php?act=member_feedback&op=feedback_add',
					method: 'post',
					data: {
						feedback:that.feedback.trim()
					},
				}).then(function(res) {
					if(res.error_code==0){
						uni.showToast({
							title:"提交成功",
							icon:"none",
							success() {
								setTimeout(()=>{
									uni.navigateBack({
										delta:1
									})
								},1500)
							}
						})
						
					}else{
						uni.showToast({
							icon:"none",
							title:res.message
						})
					}
				})
			}
		}
	}
</script>

<style>
	.Center{
		margin: 10rpx 40rpx;
	}
	.Title{
		margin: 20rpx;
		margin-left: 0rpx;
	}
	.textarea{
		background-color: #FFFFFF;
		border: 1rpx solid #EEEEEE;
		border-radius: 20rpx;
		padding: 10rpx;
		width: 97%;
	}
	.Submit{
		width: 90%;
		margin: 0 auto;
		line-height: 70rpx;
		color: #FFFFFF;
		background-color: #ff4300;
		text-align: center;
		margin-top: 100rpx;
		border-radius: 10rpx;
	}
</style>
